package cn.lzj.listener;

import cn.lzj.pojo.ProductBase;
import cn.lzj.pojo.ProductType;
import cn.lzj.service.base.IndexService;
import cn.lzj.service.base.impl.indexServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.context.ApplicationEvent;


import java.util.List;

public class indexStartEvent extends ApplicationEvent {


    @Resource
    private IndexService indexService;

    public indexStartEvent(Object source) {
        super(source);
    }

    public List<ProductBase> getIndexProductBase(){

        List<ProductBase> productBaseList = indexService.selectProduct();


        return productBaseList;
    }

    public List<ProductType> getIndexProductType(){


        List<ProductType> productTypeList = indexService.selectProductType();

        return productTypeList;
    }

    public void print(){
        System.out.println("监听成功");
    }

}
